package com.xuyang.server;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xuyang.utils.MySqlHelper;
import com.xuyang.utils.SqlHelper;

/**
 * Servlet implementation class UserLoginServlet
 */
public class UserLoginServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");
		response.setCharacterEncoding("UTF-8");
		response.setHeader("Content-Type", "charset=utf-8");
		String userName=request.getParameter("userName");
		String passWord=request.getParameter("passWord");
		//将登录结果返回回去
		response.getWriter().print(MySqlHelper.getInstance().loginSuccess(userName, passWord));
		
	}

}
